package com.liy.framework.web.rs.service;

import com.liy.framework.common.extvo.ResultVO;
import java.io.Serializable;
import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;

@Produces({"application/json;charset=UTF-8"})
public interface IBaseRSService<T, PK extends Serializable> {

    @PUT
    @Consumes({"application/json;charset=UTF-8"})
    ResultVO add(T var1) throws Exception;

    @POST
    @Consumes({"application/json;charset=UTF-8"})
    ResultVO update(T var1) throws Exception;

    @DELETE
    @Consumes({"application/json;charset=UTF-8"})
    ResultVO delete(PK pk) throws Exception;

    @GET
    @Path("/{id}")
    @Consumes({"application/json;charset=UTF-8"})
    T findById(@PathParam("id") PK id) throws Exception;

    @GET
    @Path("/query")
    List<T> findList(T var1) throws Exception;

    @Path("/query/{pageSize}/{pageNo}")
    @Consumes({"application/json;charset=UTF-8"})
    List<T> findByPage(T var1, @PathParam("pageSize") Integer var2, @PathParam("pageNo") Integer var3) throws Exception;
}
